//
//  ProfileViewController.swift
//  Swift微博
//
//  Created by 陈竹 on 16/2/21.
//  Copyright © 2016年 陈竹. All rights reserved.
//

import UIKit

class ProfileViewController: RootViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        // 设置访客视图
        visitorView?.setupInfo("visitordiscover_image_profile",
            message: "登录后，你的微博、相册、个人资料会显示在这里，展示给别人")
        
        navigationItem.rightBarButtonItem=UIBarButtonItem(title: "注销", style: .Done, target: self, action: "outLogin")
    }
    
    func outLogin(){
        NSUserDefaults.standardUserDefaults().removeObjectForKey("CZWeiboUserAccountKey")
        print("删除保存的用户信息")
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    
    /*
    // MARK: - Navigation
    
    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
    // Get the new view controller using segue.destinationViewController.
    // Pass the selected object to the new view controller.
    }
    */
    
}
